﻿@model IEnumerable<ICDA.Web.Models.LeaveModel>
@{
    ViewBag.Title = "Leave";
}
<script type="text/javascript">
</script>
<div class="tabscontainer">
     <div class="tabs">
        <div class="tab   first" id="tab_menu_1">
            <div class="link">@Html.ActionLink("Leave Apply", "LeaveApply", "Leave")</div>
            <div class="arrow"></div>
        </div>
        <div class="tab selected last" id="tab_menu_2">
            <div class="link">@Html.ActionLink("View Leave", "ViewLeave", "Leave")</div>
            <div class="arrow"></div>
        </div>
    </div>
    <div class="curvedContainer">
        <div class="tabcontent" id="tab_content_2" style="display:block">
            <table id="table-6" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        
                        <th>
                            Leave / Training
                        </th>
                        <th>
                            Leave Start Date
                        </th>
                        <th>
                            Leave End Date
                        </th>
                        <th>
                            Day Type
                        </th>
                        <th>
                            Leave Name
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null)
                    {
                        foreach (var item in Model)
                        {
                        <tr>
                            <td>@if (item.LeaveType){
                                <text>Leave</text>}
                                else{
                                <text>Training</text>}
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveStartDate)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveEndDate)
                            </td>
                            <td>@if (item.DayType){
                                <text>Full Day</text>}
                                else{
                                <text>Half Day</text>}
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.LeaveName)
                            </td>
                            <td>
                                @Html.ActionLink("Edit", "LeaveEdit", new { id = item.ID }) |
                                @Html.ActionLink("Delete", "DeleteLeave", new { id = item.ID })
                            </td>
                        </tr>
                        }
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
